﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Telerik.Web.Mvc;
using Microhard.Core.DBUtility;



namespace Microhard.Permission.Interface
{
    /// <summary>
    /// 控制器接口类
    /// 带下划线的函数，返回的类型为Json Result
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IMicroHardControllerOperations<T>
    {
        //普通操作
        ActionResult Index(ScopeResult scope);
        ActionResult Create();
        ActionResult CreateWithParams(T model);
        ActionResult SaveCreate(T model, bool continueEditing, ScopeResult scope);
        ActionResult Update(Guid identity, ScopeResult scope);
        ActionResult SaveUpdate(T model, ScopeResult scope);
        ActionResult Delete(List<Guid> identities, ScopeResult scope);
        ActionResult DeleteSingle(List<T> models, ScopeResult scope);
        ActionResult _List(GridCommand command, T model, ScopeResult scope);
        ActionResult _ListWithNoPaging(T model, ScopeResult scope);
        ActionResult _GetSingleModel(Guid id);
    }
}
